import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int money=sc.nextInt();
        String str="";
        int temp=money;
        while(temp!=0)
        {
            int n=temp%10;
            str=str+getCapital(n);
           temp=temp/10;
        }
        int count=7-str.length();
        while(count>0)
        {
            str="零"+str;
            count--;
        }
        String result="";
        String[] arr={"佰","拾","万","仟","佰","拾","元"};
        for (int i = 0; i <str.length(); i++) {
            char c=str.charAt(i);
            result=result+c+arr[i];
        }
        System.out.println(result);
    }
    public static String getCapital(int number){
        String[] arr={"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
        return arr[number];

    }

}
